// const { defineConfig } = require('@vue/cli-service')
// module.exports = defineConfig({
//   transpileDependencies: true
// })


const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave:false
})

module.exports = {   
  
  // publicPath:'/public/',
  devServer: {
    open: true,
    host: 'localhost',
    port: 18080,
    https: false,
      proxy: {
          '^/api': {
              target: 'http://127.0.0.1:28080/',//接口的前缀
              ws:true,//代理websocked
              changeOrigin:true,//虚拟的站点需要更管origin
              pathRewrite:{
                  '^/api':''//重写路径
              }
          }
      }
  },

  productionSourceMap: false,
  configureWebpack: (config) => {
  if (process.env.NODE_ENV === 'production') {
  // 启用Terser插件进行代码压缩
  config.optimization.minimizer[0].options.terserOptions = {
  drop_console: true, // 移除所有的console.log语句
  };
  }
  },

  chainWebpack: config => {
    config.plugin('html').tap(args => {
      args[0].title = '土豆猫图形试验台-社区版';
      return args;
    });

  }
  
}


